﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	x:Class="AzukiMapUI.ColorDialog"
	d:DesignWidth="640" d:DesignHeight="480" xmlns:SilverlightContrib_Controls="clr-namespace:SilverlightContrib.Controls;assembly=SilverlightContrib.Controls" xmlns:AzukiMapUI="clr-namespace:AzukiMapUI" xmlns:basics="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls">

	<Grid x:Name="LayoutRoot">
		<AzukiMapUI:PopupWindow HorizontalAlignment="Left" VerticalAlignment="Top" Title="Select a color">
			<Grid Height="480" Width="640">
				<Grid.RowDefinitions>
					<RowDefinition Height="208"/>
					<RowDefinition Height="26"/>
					<RowDefinition Height="26"/>
					<RowDefinition Height="26"/>
					<RowDefinition Height="26"/>
					<RowDefinition Height="26"/>
					<RowDefinition Height="*"/>
					<RowDefinition Height="34"/>
				</Grid.RowDefinitions>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="80"/>
					<ColumnDefinition Width="120"/>
					<ColumnDefinition Width="*"/>
				</Grid.ColumnDefinitions>
				
				<!-- labels -->
				<TextBlock Margin="4,0,0,0" Grid.Row="3" Text="RGB" TextWrapping="Wrap" VerticalAlignment="Center"/>
				<TextBlock Margin="4,0,0,0" Grid.Row="4" Text="Opacity" TextWrapping="Wrap" VerticalAlignment="Center"/>
				<TextBlock Margin="4,0,0,0" Grid.Row="5" Text="Pallet" TextWrapping="Wrap" VerticalAlignment="Center"/>
				
				<SilverlightContrib_Controls:ColorPicker x:Name="CpPicker" ColorSelected="CpPicker_ColorSelected" Margin="4,4,4,4" Grid.ColumnSpan="2"/>
				<Rectangle x:Name="RtSelectedColor" Margin="8,8,8,8" Grid.Row="1" Grid.RowSpan="2" Fill="#FFFF0000" Stroke="#FF000000" StrokeThickness="0.5"/>
				<TextBlock x:Name="TbkColorName" Margin="4,0,0,0" Grid.Row="1" Text="Color Name" TextWrapping="Wrap" Grid.Column="1" VerticalAlignment="Center" Grid.RowSpan="2"/>
				<TextBlock x:Name="TbkRGB" Margin="4,0,0,0" Grid.Column="1" Grid.Row="3" Text="#ff0000" TextWrapping="Wrap" VerticalAlignment="Center"/>
				<TextBox x:Name="TbOpacity" LostFocus="TbOpacity_LostFocus" Margin="4,0,0,0" Grid.Column="1" Grid.Row="4" Text="100" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Left"/>
                <!--
				<TextBlock x:Name="TbkPalletName" Margin="4,0,0,0" Grid.Column="1" Grid.Row="5" Text="Color of Japan" TextWrapping="Wrap" VerticalAlignment="Center"/>
                -->
				<Grid Margin="4,2,4,2" Grid.Column="2" Grid.RowSpan="7">
					<Grid.RowDefinitions>
						<RowDefinition Height="150"/>
						<RowDefinition Height="12"/>
						<RowDefinition Height="*"/>
					</Grid.RowDefinitions>
					<basics:TabControl Margin="0,0,0,2" Grid.RowSpan="2">
						<basics:TabItem Header="Pallet Name 1" FontSize="8">
							<Grid>
								<AzukiMapUI:ColorPallet x:Name="CpPallet" ColorPalletDataUri="http://localhost/AzukiMap/ColorOfJapan.xml" SelectionChanged="CpPallet_SelectionChanged" Margin="0,0,0,0" Grid.Column="2"/>
							</Grid>	
						</basics:TabItem>
					</basics:TabControl>
					<basics:TabControl Margin="0,2,0,0" Grid.Row="2" TabStripPlacement="Bottom">
						<basics:TabItem Header="Selected Colors" FontSize="8">
							<Grid>
								<AzukiMapUI:ColorPallet x:Name="CpSelectedPallet" SelectionChanged="CpPallet_SelectionChanged" CanRemove="True" Margin="0,0,0,0" Grid.Column="2"/>
							</Grid>	
						</basics:TabItem>
					</basics:TabControl>
					<basics:GridSplitter BorderThickness="1,1,1,1" Cursor="SizeNS" HorizontalAlignment="Stretch" Margin="1,1,1,1" Grid.Row="1" Height="6"/>
				</Grid>
				<Image x:Name="IconAddPallet" MouseLeftButtonUp="IconAddPallet_MouseLeftButtonUp" HorizontalAlignment="Right" Margin="0,8,0,2" Width="16" Grid.Row="2" Source="../icons/add.png" Stretch="Fill"/>
				<Rectangle Margin="0,0,0,0" Grid.ColumnSpan="3" Grid.Row="7" Fill="#FFEEEEEE" Stroke="{x:Null}"/>
				<Button x:Name="BtnOk" HorizontalAlignment="Right" Margin="0,0,8,4" Width="78" Grid.Column="2" Grid.Row="7" Content="Ok" VerticalAlignment="Bottom" Height="24"/>
				<Button x:Name="BtnCancel" HorizontalAlignment="Right" Margin="0,0,92,4" Width="78" Grid.Column="2" Grid.Row="7" Content="Cancel" VerticalAlignment="Bottom" Height="24"/>
                <Image x:Name="IconErrorOpacity" HorizontalAlignment="Right" Margin="0,0,4,0" Width="16" Grid.Row="4" Source="../icon/error.png" VerticalAlignment="Center" Height="16"/>
			</Grid>
		</AzukiMapUI:PopupWindow>
	</Grid>
</UserControl>